In the field of communications, in order to improve network quality as well as the reliability and bandwidth of a service, multiple physical network ports of a communication device are usually logically bound together and used as one network device.
Referring to FIG. 1, FIG. 1 is a schematic diagram of network port binding in the prior art, and the whole system includes two layers in terms of logical functions: an application layer and a physical layer. The physical layer includes multiple physical network cards (such as a physical network card 0 and a physical network card 1 shown in FIG. 1), and each physical network card has some physical network ports (for example, the physical network card 0 has physical network ports 0 and 1). The physical network ports here not only represent a part of interface components that are on the network card and connected to other physical components, but further include function modules (such as PHY (Physical Layer, physical layer) chips) that process data of the physical network ports. The “physical network port” here may be construed as a function module located on the network card and having a data processing capability, and corresponds to a data channel.
Each network port in the network card is virtualized into a virtual network card (which is indicated by Eth plus a digital label here) in the application layer (such as an operating system) through the processing of a driver and relevant software, for example, the physical network port 0 is virtualized into Eth0, and a physical network port 2 is virtualized into Eth2.
After the physical network ports are virtualized into virtual network cards, these virtual network cards may be bound to form a network device (the network device is not shown in the figure) through a certain binding policy. Because each virtual network card here corresponds to a physical network port, “binding the virtual network cards” may be construed as “binding the physical network ports” and these two statements are not strictly distinguished here.
Binding multiple physical network ports facilitates uniform processing in the application layer, thereby implementing load balancing and redundancy backup.
During the implementation of the present disclosure, the inventor finds that the prior art at least has the following defects:
In the prior art, in the binding of the application layer, binding is performed on the network ports only once, for example, once a load balancing mode is used for binding, a redundancy backup mode cannot be used. While in a practical application, to better meet service demands, binding usually needs to be performed twice on the network ports, for example, redundancy backup is implemented for two network port groups and load balancing is implemented for multiple network ports in each group. Therefore, the prior art fails to implement the requirement of binding twice, thereby failing to better meet the service demands.